import App from './App'
import store from './store'
import messages from './locale/index'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './static/style/big-small.scss'
import { baseUrl } from '@/utils/setting.js'
let i18nConfig = {
	locale: uni.getLocale(),
	messages
}
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import VueI18n from 'vue-i18n'
import MyUseOut from '@/components/MyUseOut/MyUseOut.vue'; // 引入弹框组件

import tools from 'utils/tools'
Vue.prototype.$util = tools;
Vue.prototype.BasePath =baseUrl;

Vue.component('MyUseOut', MyUseOut); // 全局注册弹框组件
Vue.use(VueI18n)
Vue.use(ElementUI);
const i18n = new VueI18n(i18nConfig)
Vue.config.productionTip = false

App.mpType = 'app'
const app = new Vue({
	i18n,
	store,
	...App,

})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import {
	createI18n
} from 'vue-i18n'
const i18n = createI18n(i18nConfig)
export function createApp() {
	const app = createSSRApp(App)
	app.use(i18n)
	return {
		app
	}
}
// #endif